import 'package:flutter/material.dart';

class LeftIconButton extends StatelessWidget {
  final Function onPressed;
  final Icon icon;
  final String title;

  const LeftIconButton(
      {Key key,
      @required this.onPressed,
      @required this.icon,
      @required this.title})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return TextButton(
      onPressed: onPressed,
      child: Row(
        children: [
          icon,
          const SizedBox(
            width: 8.0,
          ),
          Text(
            title,
            style: TextStyle(color: Colors.black),
          ),
        ],
      ),
    );
  }
}
